﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShivamEMR.Model.Domain.LocationDomain;
using ShivamEMR.Model.Domain.DoctorsDomain;
using ShivamEMR.Model.Domain.CRMDomain;
using System.ComponentModel.DataAnnotations;

namespace ShivamEMR.Model.Domain.PatientDomain
{
   public class Admission
    {
        #region Properties
        public Guid ID { get; set; }
       [DataType(DataType.Date)]
        public DateTime AdmissionDateAndTime { get; set; }
        public string ReferrerNotes { get; set; }
        public string Notes { get; set; }
          [DataType(DataType.Date)]
        public DateTime DischargeDateAndTime { get; set; }
        #endregion

        #region ForeignKeyProperties
       [ForeignKey("AdmissionType")]
        public int AdmissionTypeID { get; set; }
       [ForeignKey("Patient")]
        public Guid PatientID { get; set; }
       [ForeignKey("ReferredBy")]
        public Nullable< Guid> ReferredByID { get; set; }
       [ForeignKey("Status")]
        public int AdmissionStatusID { get; set; } 
        #endregion

        #region NavigationalProperties
        public virtual AdmissionType AdmissionType { get; set; }
        public virtual Patient Patient { get; set; }
        public virtual Doctor ReferredBy { get; set; }
        public virtual AdmissionStatus Status { get; set; }
        public virtual ICollection<Insurance> Insurances { get; set; }
        public virtual ICollection<PatientRepresentative> Representatives { get; set; }      
        public virtual ICollection<Assignment> Assignments { get; set; }
        public virtual ICollection<PatientInformation> Informations { get; set; }
        public virtual ICollection<Diagnosis> Diagnosises { get; set; }
        public virtual ICollection<PatientTest> Tests { get; set; }
        public virtual ICollection<PatientService> Services { get; set; }
        public virtual ICollection<PatientRadiology> Radiologies { get; set; }
        #endregion

    }
}
